//
//  LCBDetailsPlayTableViewCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/4/26.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LCBDetailsPlayTableViewCell.h"

@implementation LCBDetailsPlayTableViewCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.labelNumber = [[UILabel alloc]initWithFrame:CGRectMake(0,30,50, 30)];
        self.labelNumber.font = FONT_18;
        self.labelNumber.textColor = RGBColor(206, 206, 206);
        self.labelNumber.textAlignment = NSTextAlignmentCenter;
        [self addSubview:self.labelNumber];

        self.labelTitle = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.labelNumber.frame)+2, 10, ScreenWidth-CGRectGetMaxX(self.labelNumber.frame)-2, 30)];
        self.labelTitle.textColor = RGBColor(51, 51, 51);
        self.labelTitle.font = FONT_14;
        [self addSubview:self.labelTitle];

        UIImageView * imageViewPlay = [[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.labelNumber.frame)+2, CGRectGetMaxY(self.labelTitle.frame)+7,25, 25)];
        imageViewPlay.image = [UIImage imageNamed:@"播放三角"];
        [self addSubview:imageViewPlay];

        self.labelPlayNumber = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(imageViewPlay.frame)+5,CGRectGetMaxY(self.labelTitle.frame)+12 ,ScreenWidth-CGRectGetMaxX(imageViewPlay.frame)-120, 15)];
        self.labelPlayNumber.textColor = RGBColor(206 , 206, 206);
        [self addSubview:self.labelPlayNumber];

        int value = ScreenWidth-CGRectGetMaxX(self.labelPlayNumber.frame);
        self.butVideo = [[UIButton alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.labelPlayNumber.frame), CGRectGetMaxY(self.labelTitle.frame),value/2, 40)];
//        self.butVideo.backgroundColor = [UIColor yellowColor];
        [self addSubview:self.butVideo];

        self.imageVideo = [[UIImageView alloc]initWithFrame:CGRectMake((self.butVideo.frame.size.width-30)/2, 10, 30, 25)];
        self.imageVideo.image = [UIImage imageNamed:@"视频_灰"];
        self.imageVideo.userInteractionEnabled = YES;
        [self.butVideo addSubview:self.imageVideo];

        self.butDownload = [[UIButton alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.butVideo.frame), CGRectGetMaxY(self.labelTitle.frame),value/2, 40)];
//        self.butDownload.backgroundColor = [UIColor yellowColor];
        [self addSubview:self.butDownload];
        self.imageDownload = [[UIImageView alloc]initWithFrame:CGRectMake((self.butDownload.frame.size.width-30)/2, 10, 30, 25)];
        self.imageDownload.image = [UIImage imageNamed:@"视频_下载"];
        self.imageDownload.userInteractionEnabled = YES;
        [self.butDownload addSubview:self.imageDownload];
    }
    return self;
}

@end
